﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="PromeniTaksa.aspx.cs" Inherits="PromeniTaksa" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
    <table width=100% height=500 border="0"><tr width=100%><td width=100% align=center>
    
      
        <asp:AccessDataSource ID="AccessDataSource1" runat="server" DataFile="~/Baza/Gradovi.accdb" SelectCommand="SELECT * FROM [Gradovi]"></asp:AccessDataSource>
        <asp:ListBox ID="ListBox1"  runat="server" DataSourceID="AccessDataSource1" DataValueField="IdGrad" DataTextField="ImeGrad" AutoPostBack="true"></asp:ListBox>    
        <br /><br />

    
        <asp:AccessDataSource runat="server" ID="AccessDataSource2" runat="server" DataFile="~/Baza/Gradovi.accdb" SelectCommand="SELECT * FROM [Gradovi] WHERE ([IdGrad] = ?)"
            UpdateCommand="UPDATE Gradovi SET TaksaGrad=taksa WHERE ([IdGrad] = ?)" >
            <SelectParameters>                
                <asp:ControlParameter ControlID="ListBox1" DefaultValue="0" Name="IdGrad" PropertyName="SelectedValue" Type="Int32" />
            </SelectParameters>
            <UpdateParameters>
                <asp:FormParameter FormField="TextBoxNovaTaksaGrad" Name="taksa" />
                <asp:ControlParameter ControlID="ListBox1" DefaultValue="0" Name="IdGrad" PropertyName="SelectedValue" Type="Int32" />
            </UpdateParameters>
        </asp:AccessDataSource>
        <asp:Label ID="Label2" runat="server" Text="Моментална такса:"></asp:Label>
        <asp:DropDownList runat="server" ID="DropDownList1" AutoPostBack="true" DataSourceID="AccessDataSource2" DataValueField="IdGrad" DataTextField="TaksaGrad" >    
        </asp:DropDownList>
        <br /><br />
        <asp:Label ID="Label3" runat="server" Text="" ></asp:Label></asp:Label><asp:Label ID="Label4"
            runat="server" Text="Внеси ја новата такса "></asp:Label><asp:TextBox ID="TextBoxNovaTaksaGrad" runat="server"></asp:TextBox>
        

        <br /><br />
        <asp:Button ID="Button1" runat="server" Text="Промени" onclick="Button1_Click" /></asp:AccessDataSource>
                 <asp:Button ID="Button2" runat="server" Text="Назад кон менито" 
            onclick="Button2_Click" Width="128px" />
    </td></tr></table>
    </div>
    </form>
</body>
</html>
